package com.easypan.mappers;


import com.easypan.entity.query.BaseParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 用户信息 Mapper 接口
 * </p>
 *
 * @author Yandel
 * @since 2025-06-04
 */
@Mapper
public interface UserInfoMapper<T, P> extends BaseMapper<T, P> {
    /**
     * 根据Email获取对象
     */
    T selectByEmail(String toEmail);


    /**
     * 根据UserId获取对象
     */
    T selectByUserId(String userId);


    T selectByNickName(String nickName);

    /**
     * 根据UserId更新
     */
    Integer updateByUserId(@Param("bean") T t, @Param("userId") String userId);

    Integer updateUserSpace(@Param("userId") String userId, @Param("useSpace") Long useSpace, @Param("totalSpace") Long totalSpace);
    /**
     * 根据Email更新
     */
    Integer updateByEmail(@Param("bean") T t, @Param("email") String email);
}
